﻿<!--<div class="jumbotron">
    <p><strong>建议在FireFox或Chrome下使用本系统</strong></p>
</div>-->
<h1>SOAP 请求</h1>
<div class="row" style="display:none;">
    <div class="col-md-10">
        <form class="form-inline">
            <div class="form-group">
                <label for="serviceName">服务</label>
                <select name="serviceName" class="form-control" data-ng-model="wsID" data-ng-change="loadMethods()">
                    <option data-ng-repeat="ws in webServices" value="{{ws.ID}}">{{ws.ServiceDesc}}
                    </option>
                </select>
            </div>
            <div class="form-group">
                <label for="serviceName">方法</label>
                <select name="serviceName" class="form-control" data-ng-model="mID" data-ng-change="loadDataPacks()">
                    <option data-ng-repeat="m in methods" value="{{m.ID}}">{{m.MethodName}}
                    </option>
                </select>
            </div>
            <div class="form-group">
                <label for="serviceName">SAOP包</label>
                <select name="serviceName" class="form-control" data-ng-model="dID" data-ng-change="setDataPackContent()">
                    <option data-ng-repeat="d in dataPacks" value="{{d.ID}}">{{d.SOAPRequestDesc}}
                    </option>
                </select>
            </div>
        </form>
    </div>
    <div class="col-md-2">
        <div class="form-group">
            <p class="text-primary" style="text-align: right; line-height: 1.42857143" data-ng-show="curWebService != null">
                <a href="{{curWebService.WSDLAddress | fixUrl}}" target="_blank" class="btn btn-info">查看WSDL</a>
            </p>
        </div>
    </div>
</div>
<p></p>
<div class="row">
    <div class="col-md-10">
        <div class="btn-group" role="group" aria-label="...">
            <button type="button" class="btn btn-default btn-larger dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <span data-ng-show="!curWs">服务</span>
                <span data-ng-show="curWs">{{curWs.ServiceDesc}}</span>
                <span class="caret"></span>
            </button>
            <ul class="dropdown-menu">
                <li>
                    <div style="padding: 0 4px;">
                        <input type="text" class="form-control" data-ng-model="wsQuery" placeholder="服务名" />
                    </div>
                </li>
                <li role="separator" class="divider"></li>
                <li style="height: 200px; overflow-y: scroll; width: 98%; padding-right: 5px;">
                    <a data-ng-repeat="ws in webServices | filter:wsFilter" href="javascript:void(0);" data-ng-click="selectWebService(ws)">{{ws.ServiceDesc}}</a>
                </li>
            </ul>
        </div>
        <div class="btn-group" role="group" aria-label="...">
            <button type="button" class="btn btn-default btn-larger dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <span data-ng-show="!curMethod">方法</span>
                <span data-ng-show="curMethod">{{curMethod.MethodName}}</span>
                <span class="caret"></span>
            </button>
            <ul class="dropdown-menu">
                <li>
                    <div style="padding: 0 4px;">
                        <input type="text" class="form-control" data-ng-model="mQuery" placeholder="方法名" />
                    </div>
                </li>
                <li role="separator" class="divider"></li>
                <li style="height: 200px; overflow-y: scroll; width: 98%; padding-right: 5px;">
                    <a data-ng-repeat="m in methods | filter:mFilter" href="javascript:void(0);" data-ng-click="selectMethod(m)">{{m.MethodName}}</a>
                </li>
            </ul>
        </div>
        <div class="btn-group" role="group" aria-label="...">
            <button type="button" class="btn btn-default btn-larger dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <span data-ng-show="!curDp">SOAP包</span>
                <span data-ng-show="curDp">{{curDp.SOAPRequestDesc}}</span>
                <span class="caret"></span>
            </button>
            <ul class="dropdown-menu">
                <li>
                    <div style="padding: 0 4px;">
                        <input type="text" class="form-control" data-ng-model="dQuery" placeholder="包名" />
                    </div>
                </li>
                <li role="separator" class="divider"></li>
                <li style="height: 200px; overflow-y: scroll; width: 98%; padding-right: 5px;">
                    <a data-ng-repeat="d in dataPacks | filter:dataPackFilter" href="javascript:void(0);" data-ng-click="selectDataPack(d)">{{d.SOAPRequestDesc}}</a>
                </li>
            </ul>
        </div>
    </div>
    <div class="col-md-2">
        <div class="form-group">
            <p class="text-primary" style="text-align: right; line-height: 1.42857143" data-ng-show="curWebService != null">
                <a href="{{curWebService.WSDLAddress | fixUrl}}" target="_blank" class="btn btn-info">查看WSDL</a>
            </p>
        </div>
    </div>
</div>
<table class="table table-bordered" style="margin-top: 10px;" data-ng-show="attachments.length>0">
    <thead>
        <tr>
            <th colspan="3">附件下载</th>
            
        </tr>
    </thead>
    <tbody>
        <tr data-ng-repeat="item in attachments track by $index">
            <td><a href="Download.aspx?aid={{item.ID}}" target="_blank">{{item.FileName}}</a></td>
            <td class="col-md-2">{{item.CreatedOn}}</td>
            <td>
                <a href="Download.aspx?aid={{item.ID}}" target="_blank" class="btn btn-default">下载</a>
            </td>
        </tr>
    </tbody>
</table>
<div class="panel panel-default" style="margin-top: 20px;">
    <div class="panel-heading">
        <input type="button" class="btn btn-primary" value="发送请求" data-ng-click="postSoapRequest()" />
        <input type="button" class="btn btn-primary" value="格式化" data-ng-click="formatXml()" />
    </div>
    <div class="panel-body">
        <div class="form-group">
            <label for="soapData">输入参数</label>
            <div class="alert alert-danger" role="alert" data-ng-show="error.length > 0">{{error}}</div>
            <textarea name="soapData" class="form-control" style="height: 400px; width: 100%;" data-ng-model="soapData"></textarea>
        </div>
        <div class="form-group" style="margin-top: 20px;">
            <label for="soapData">返回结果</label>
            <textarea name="responseData" class="form-control" style="height: 400px; width: 100%;" data-ng-model="responseData"></textarea>
        </div>
    </div>
</div>



